<template>
  <div>
    <div class="music-list">
      <div class="back" @click="()=>$router.go(-1)">
        <i class="icon-back"></i>
      </div>
      <h1 class="title" v-html="singerInfo.name"></h1>
      <div class="bg-image" :style="bgStyle" ref="bgImage">
        <!-- v-show="isShowRandomBtn" -->
        <div class="play-wrapper">
          <div ref="playBtn" class="play" @click="random">
            <i class="icon-play"></i>
            <span class="text">随机播放全部</span>
          </div>
        </div>
        <div class="filter" ref="filter"></div>
      </div>
      <div class="bg-layer" ref="layer"></div>
      <div ref="list" class="list">
        <scroll :data="nomarlSongList" @cube-scroll="scroll" class="over-flow">
          <div class="song-list-wrapper">
            <song-list :nomarlSongList="nomarlSongList" @select="selectItem"></song-list>
          </div>
        </scroll>
      </div>
    </div>
  </div>
</template>

<script>
import scroll from "@/base/scroll";
import songList from "@/base/song_list/song_list";
export default {
  components: {
    scroll,
    songList
  },
  props: {
    singerInfo: {
      type: Object,
      default() {
        return {};
      }
    },
    nomarlSongList: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  methods: {
    scroll() {},
    selectItem() {},
    random() {}
  },
  computed: {
    bgStyle() {
      return { "background-image": `url(${this.singerInfo.src})` };
    }
  }
};
</script>

<style scoped lang="stylus">
  @import ("./stylus/music_list.styl");
  .bg-image
     z-index 10
</style>